import type { RouteRecordRaw } from "vue-router"

const Layouts = () => import("@/layouts/index.vue")


export const systemRoutes: RouteRecordRaw[] =[
  {
      path: "/redirect",
      component: Layouts,
      meta: {
        hidden: true
      },
      children: [
        {
          path: ":path(.*)",
          component: () => import("@/pages/redirect/index.vue")
        }
      ]
    },
    {
      path: "/403",
      component: () => import("@/pages/error/403.vue"),
      meta: {
        hidden: true
      }
    },
    {
      path: "/404",
      component: () => import("@/pages/error/404.vue"),
      meta: {
        hidden: true
      },
      alias: "/:pathMatch(.*)*"
    },
    {
      path: "/login",
      component: () => import("@/pages/login/index.vue"),
      meta: {
        hidden: true
      }
    },
    {
      path: "/",
      component: Layouts,
      redirect: "/dashboard",
      children: [
        {
          path: "dashboard",
          component: () => import("@/pages/dashboard/index.vue"),
          name: "Dashboard",
          meta: {
            title: "首页",
            svgIcon: "dashboard",
            affix: true
          }
        }
      ]
    }
]
